import {getTopicList} from './topic'
export function showDrawer() {
  return (dispatch) => {
    dispatch({type: 'showDrawer'})
  }
}

export function changeCate (cate) {
  return (dispatch) => {
    dispatch({type: 'changeCate', curCate: cate})
    dispatch(getTopicList({tab:cate.key, page: 1, limit: 20}))
  }
}

export function hideDrawer () {
  return (dispatch) => {
    dispatch({'type': 'hideDrawer'})
  }
}